//
//  ZCSingerMVTableViewCell.m
//  VoiceMusic
//
//  Created by dllo on 15/10/24.
//  Copyright © 2015年 zhangdeyu. All rights reserved.
//

#import "ZCSingerMVTableViewCell.h"
#import <Masonry.h>
#import <UIImageView+WebCache.h>
#import "ZCBaseLabel.h"
#import "ZCBaseView.h"
@implementation ZCSingerMVTableViewCell

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    [self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
    
    [self.picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(self.backView).offset(5);
        make.width.equalTo(@160);
        make.bottom.equalTo(self.backView).offset(-5);
    }];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.backView).offset(5);
        make.left.equalTo(self.picImageView.mas_right).offset(5);
        make.right.equalTo(self.backView).offset(0);
        make.height.equalTo(@40);
    }];
    [self.titleLabel setFont:[UIFont boldSystemFontOfSize:25]];
    
    [self.firstLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.titleLabel.mas_bottom).offset(-1);
        make.left.equalTo(self.picImageView.mas_right).offset(5);
        make.right.equalTo(self.backView).offset(0);
        make.height.equalTo(@20);
    }];
    [self.firstLabel setFont:[UIFont systemFontOfSize:14]];
    self.firstLabel.alpha = 0.6;
    
    [self.detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.firstLabel.mas_bottom).offset(-2);
        make.left.equalTo(self.picImageView.mas_right).offset(5);
        make.right.equalTo(self.backView).offset(0);
        make.height.equalTo(@55);
    }];
    [self.detailLabel setFont:[UIFont systemFontOfSize:14]];
    [self.detailLabel setNumberOfLines:0];
    self.detailLabel.alpha = 0.6;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)getInfo:(ZCSingerMVModel *)model
{
    [self.picImageView sd_setImageWithURL:[NSURL URLWithString:model.picUrl] placeholderImage:[UIImage imageNamed:@"333"]];
    [self.titleLabel setText:model.videoName];
    [self.firstLabel setText:model.singerName];
    [self.detailLabel setText:model.desc];
    
}
@end
